home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Sample Code / Sprocket / Interfaces / AppleEventHandling.h next >
Encoding:
C/C++ Source or Header  |  1994-12-15  |  2.3 KB  |  69 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        AppleEventHandling.h
  3.  
  4.     Contains:    Minimalist support for the required and Display Manager suites
  5.                 To really support AppleScript™, we’ll do more work in here.
  6.  
  7.     Written by: Dave Falkenburg
  8.  
  9.     Copyright:    © 1993-1994 by Dave Falkenburg, all rights reserved.
  10.  
  11.     Change History (most recent first):     
  12.  
  13.          <7>    12/15/94    DRF        Added ChooseApplicationAsAEtarget.
  14.          <6>    11/23/94    DRF        InstallAppleEventHandlers is now called InitAppleEventRoutines.
  15.                                     Also added a useful global: gThisProcessDesc for self targetting
  16.                                     of AppleEvents.
  17.          <5>    11/16/94    DRF        Add StandardAEIdleProc for people who like using AESend with
  18.                                     kAEWaitReply.
  19.          <4>    11/12/94    DRF        AppConditionals.h -> BuildConditionals.h
  20.          <2>      9/4/94    DRF        Added Text Services AppleEvent handlers.
  21.  */
  22.  
  23. #ifndef        _APPLEEVENTHANDLING_
  24. #define        _APPLEEVENTHANDLING_
  25.  
  26. #ifndef        __APPLEEVENTS__
  27. #include    <AppleEvents.h>
  28. #endif
  29.  
  30. #ifndef        __OCESTANDARDMAIL__
  31. #include    <OCEStandardMail.h>
  32. #endif
  33.  
  34.  
  35. void                InitAppleEventRoutines(void);
  36. OSErr                CheckAppleEventForMissingParams(AppleEvent * theAppleEvent);
  37. OSErr                ChooseApplicationAsAETarget(AEAddressDesc *targetDesc, StringPtr prompt);
  38.  
  39. extern AEIdleUPP    StandardAEIdleUPP;
  40. extern AEDesc        gThisProcessDesc;
  41.  
  42. //    Handlers for the Required Suite:
  43.  
  44. typedef OSErr        (*EachDocumentProcPtr)(LetterDescriptor *aFile,void * param);
  45. OSErr                ForEachDocumentInList(AEDescList documentList,EachDocumentProcPtr documentProc,void * documentParam);
  46.  
  47. pascal OSErr        HandleOpenApplication(AppleEvent * theAppleEvent,AppleEvent * reply, long refCon);
  48. pascal OSErr        HandleOpenDocuments(AppleEvent * theAppleEvent,AppleEvent * reply, long refCon);
  49. pascal OSErr        HandlePrintDocuments(AppleEvent * theAppleEvent,AppleEvent * reply, long refCon);
  50. pascal OSErr        HandleQuitApplication(AppleEvent * theAppleEvent,AppleEvent * reply, long refCon);
  51.  
  52.  
  53. //    Display Manager:
  54.  
  55. pascal OSErr    HandleSystemConfigNotice(AppleEvent *theAppleEvent,AppleEvent *reply,long refCon);
  56.  
  57.  
  58. #if    qInlineInputAware
  59.  
  60. //    Text Services Manager:
  61.  
  62. pascal OSErr    HandleTextServicesUpdateActiveInputArea(AppleEvent *theAppleEvent,AppleEvent *reply,long refCon);
  63. pascal OSErr    HandleTextServicesPos2Offset(AppleEvent *theAppleEvent,AppleEvent *reply,long refCon);
  64. pascal OSErr    HandleTextServicesOffset2Pos(AppleEvent *theAppleEvent,AppleEvent *reply,long refCon);
  65.  
  66. #endif
  67.  
  68. #endif
  69.